<%-- 
    Document   : home
    Created on : Sep 29, 2010, 2:40:54 PM
    Author     : M Bilal
--%>


<%@page import="wap.rockvilletech.portal.DBProc"%>
<%@ page import="java.io.*,java.sql.*,java.net.*"%>
<%@ page import="org.apache.log4j.Logger" %>

<% final Logger log = Logger.getLogger("JSP.INDEX");%>

<%@ include file="includes/header.jspf"%>

<div align="center">
    <div style="background-color: #dedfe1;padding-top:2px;background-image:url('images/new/.jpg');background-repeat: repeat-x;background-position:0% 350%;" title="">
        <a href="<%=context_Path%>"><img src='<%=context_Path%>/imgsrv?img=home_selected<%=sImgFix%>.jpg&repo=PI&s=0&w=<%=mainButtonImgWidth%>' alt="home" title="Home"></a>
        <a href="<%=context_Path%>/content/index.jsp?app=Bollywood"><img src='<%=context_Path%>/imgsrv?img=downloads<%=sImgFix%>.jpg&repo=PI&s=0&w=<%=mainButtonImgWidth%>' alt="downloads" title="Downloads"></a>
        <a href="<%=context_Path%>/coolstuff/index.jsp"><img src='<%=context_Path%>/imgsrv?img=cool_stuff<%=sImgFix%>.jpg&repo=PI&s=0&w=<%=mainButtonImgWidth%>' alt="coolstuff" title="Cool Stuff"></a>
        <a href="<%=context_Path%>/news/news.jsp"><img src='<%=context_Path%>/imgsrv?img=news<%=sImgFix%>.jpg&repo=PI&s=0&w=<%=mainButtonImgWidth%>' alt="news" title="News"></a>
    </div>

    <%
                thisPage = "Ufone-Home";
                Vector vServices = new Vector();
                DBProc db = DBProc.getInstance();
                //id,title, imgurl, href,details, title_ur, details_ur
                    String cat_name = "", cat_id, srv_title = "", srv_imgurl = "", srv_href = "", srv_id = "", srv_title_ur = "", srv_detail_ur = "", strPrevCat = "";
                try {

                    
                    boolean isSectionHeader = false, isHref = false, isRowEnd = true;
                    String[] arrService = null;
                    int serviceCount = 0;

                    cat_id = request.getParameter("id") != null ? request.getParameter("id") : "";
                    cat_name = request.getParameter("cat") != null ? request.getParameter("cat") : "";
                    vServices = db.getServices(cat_id);

                    if (!vServices.isEmpty()) {
                        
    %>
    <table width="100%" cellpadding="0"  cellspacing="0">
        <tr><td align="left" style="padding:5px 0px 0px 2px;">
                <table bgcolor="#d5d5d5" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td><img src="<%=context_Path%>/images/bar_left.png" alt="" /></td>
                        <td><img src="<%=context_Path%>/images/services/icons/<%=cat_name%>.png" alt=""/>&nbsp;</td>
                        <td><%="<b> " + cat_name + " Services </b>"%></td>
                        <td><img src="<%=context_Path%>/images/bar_right.png" alt="" /></td>
                    </tr>
                </table>
            </td></tr>
        <tr>
            <td align="center" style="background-image:url('images/new/catagory_top_part.jpg');background-repeat: repeat-x; padding:6px 0px 0px 0px; ">
                <table align="center" width="90%">
                    <%
                    for (int i = 0; i < vServices.size(); i++) {//id,title, imgurl, href,details, title_ur, details_ur
                            arrService = (String[]) vServices.get(i);
                            srv_id = arrService[0];
                            srv_title = arrService[1];
                            srv_imgurl = arrService[2];
                            srv_href = arrService[3];
                            srv_title_ur = arrService[4];
                            if ((serviceCount % 2) == 0) {
                                if (serviceCount > 0) {
                    %>
                </tr>
<%
                          }
%>
        <tr>
<%
                            }
%>
            <td width="50%" valign="top"><a href="<%=context_Path%>/ContentService.jsp?srvid=<%=srv_id%>" class="LinkIndex1">
                    <img src="<%=context_Path%>/images/bullet-grey.jpg" alt=""/> <%=srv_title%>
                </a>
            </td>
            <%
                serviceCount++;
               }

              if ((serviceCount % 2) != 0) {
            %>
            <td width="50%" valign="top">&nbsp;</td>
            <%
               }
            %>
        </tr>
    </table>

    </td>
    </tr>
</table>
<%
            }else{
                        out.println("Data Not Available!");
            }//end if

            } catch (Exception e) {
                log.error("Fetch Services :", e);
                out.println("No Service Available");
            }

%>


<%@include file="/includes/horizontal_bottom_menu.jspf"%>
<%@ include file="includes/others.jspf"%>
<div style="padding:0px 0px 0px 0px;text-decoration: underline;">
    <jsp:include page="banner.jsp">
        <jsp:param name="tags" value="<%=cat_name%>"/>
        <jsp:param name="w" value="<%=width%>"/>
    </jsp:include>
</div>

</div>

<%@ include file="includes/footer.jspf"%>



<%
            wpb.LogVisit(strIP, thisPage, strGsm, strApn, strBrand, strModel, app, request.getQueryString());
%>